{% extends 'layout.html' %}
{% block content %}
    <div>
        <div class="container">
            <div>
                <a href="/prety/add/" class="btn btn-primary"> <span class="glyphicon glyphicon-plus"
                                                                     aria-hidden="true"></span> 增加靓号</a>
                <form method="get">
                    <div class="input-group" style="width: 300px;float: right;">
                        <input type="text" name="search_data" value="{{ search_data.mobile__contains }}" class="form-control"
                               placeholder="Search for...">
                        <span class="input-group-btn">
        <button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"
                                                            aria-hidden="true"></span></button>
      </span>
                    </div>
                </form>
            </div>
            <div class="bs-example" data-example-id="simple-table">
                <table class="table table-bordered">
                    <caption><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 靓号列表</caption>
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>号码</th>
                        <th>价格</th>
                        <th>靓号等级</th>
                        <th>靓号状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for item in data_set %}
                        <tr>
                            <th scope="row">{{ item.id }}</th>
                            <td>{{ item.mobile }}</td>
                            <td>{{ item.price }}</td>
                            <td>{{ item.get_level_display }}</td>
                            <td>{{ item.get_status_display }}</td>
                            <td>
                                <a class="btn btn-success" href="/prety/{{ item.id }}/update/">编辑</a>
                                <a class="btn btn-danger" href="/prety/{{ item.id }}/delete/">删除</a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <div aria-label="..."  class="clearfix">
                <ul class="pagination" style="float: left">
                    {{ page_str }}

                </ul>
            </div>

        </div>
    </div>
{% endblock %}